home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / cbm / 5088 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: news.iastate.edu!deaven
  2. From: deaven@ishmael.ameslab.gov (David Deaven)
  3. Newsgroups: comp.sys.cbm,comp.sys.atari.8bit
  4. Subject: Re: GNU C-compiler port to 6502
  5. Date: 4 Apr 1996 18:42:53 GMT
  6. Organization: Ames Laboratory, Ames, Iowa
  7. Message-ID: <4k157d$aj4@news.iastate.edu>
  8. References: <4irqpb$7pc@esel.cosy.sbg.ac.at> <4jgc70$lmt@dodo.cosy.sbg.ac.at> <4ji1te$dnk@agate.berkeley.edu> <4jobkn$6gh@dodo.cosy.sbg.ac.at>
  9. NNTP-Posting-Host: ishmael.ameslab.gov
  10.  
  11. In article <4jobkn$6gh@dodo.cosy.sbg.ac.at>,
  12. Gerhard Wesp <gwesp@dodo.cosy.sbg.ac.at> wrote:
  13. > This is a tough example indeed. I don't know how to avoid such things
  14. >except by having a good optimizer brush up the assembly code _after_
  15. >the macro expansion has taken place. But, as you write, such an optimizer
  16. >would be quite a lot of hard work to write.
  17.  
  18.   This is called ``peephole optimization,'' and is provided by GCC.
  19. What you do is determine common sequences of bad or slow code that the
  20. compiler generates, and add a peephole optimizer to replace them
  21. with good fast code.  In GCC, this facility is provided as you write
  22. the machine spec for a new processor.
  23.  
  24. > Well, the manual says that gcc is a 32 bit compiler... Perhaps it would
  25. >really be better to try to make a ``true'' 6502 compiler (i.e. one which
  26. >knows everything about the internals of the processor)? However, the
  27. >ATARI cc65 results are a bit disappointing...
  28.  
  29.   GCC will work with quite a range of basic data type sizes.  It is by
  30. no means fixed to 32-bit processors, at least for targets.  The
  31. cross-compiler platform should be 32 bit, though (no big deal).
  32.  
  33. -- 
  34. David Deaven        deaven@ishmael.ameslab.gov
  35. A504 Physics        tel 515-294-6878
  36. Ames Laboratory     fax 515-294-0689
  37. Ames IA 50011       http://www.public.iastate.edu/~deaven
  38.